package com.apes.framework.plugin.filereader;

import com.apes.framework.plugin.log.timer.Timer;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dom4j.io.SAXReader;
import org.springframework.stereotype.Component;

import java.io.InputStream;

/**
 * 功能：Esb文件解析器
 *
 * @author xul
 * @create 2017-12-05 14:05
 */
@Component
public class ClassFileReader extends FileReader {
    protected final Logger logger = LogManager.getLogger(ClassFileReader.class);
    private final String[] packages = {"com.apes"};
    private static final String suffix = ".class";
    private SAXReader reader = new SAXReader();

    @Override
    public String getSuffix() {
        return suffix;
    }

    @Override
    public String[] getPackages() {
        return packages;
    }

    @Timer("Class解析")
    public void init() {
        read();
    }

    /**
     * 功能：Class文件解析
     */
    public void parse(InputStream is, String fileAbsolutePath) throws Exception {
        if (is == null) return;
    }


}
